Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  Verify  Whether  Attributes  are  Indexed  and-or  in  the  Global  Catalog  

 Content of Verify Whether Attributes are Indexed and-or in the Global Catalog.vbs
MD5 Hash: CDA6AAABF43D5B1B6D131F0F96B0EBC7
' Description: Determines which Active Directory attributes are indexed and which attributes are in the global catalog.


Const IS_INDEXED = 1

Set objConnection = CreateObject("ADODB.Connection")
objConnection.Open "Provider=ADsDSOObject;"

Set objCommand = CreateObject("ADODB.Command")
objCommand.ActiveConnection = objConnection

objCommand.Properties("Sort On") = "isMemberOfPartialAttributeSet"

objCommand.CommandText = _
";" & _
"(objectClass=attributeSchema);" & _
"lDAPDisplayName, isMemberOfPartialAttributeSet,searchFlags;onelevel"

Set objRecordSet = objCommand.Execute

Do Until objRecordSet.EOF
WScript.Echo objRecordset.Fields("lDAPDisplayName")
If objRecordset.Fields("isMemberOfPartialAttributeSet")Then
WScript.Echo "In the global catalog."
Else
WScript.Echo "Not in the global catlog."
End If

If IS_INDEXED AND objRecordset.Fields("searchFlags") Then
WScript.Echo "Is indexed."
Else
WScript.Echo "Is not indexed."
End If
Wscript.Echo VbCrLf
objRecordSet.MoveNext
Loop

objConnection.Close

   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a